//
//  ThemeBaseViewController.swift
//  Wanbair
//
//  Created by Li on 2025/3/6.
//

import UIKit

class ThemeBaseViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.

        // 初始加载主题
        applyTheme()
        
        // 监听主题变化
        NotificationCenter.default.addObserver(self, selector: #selector(themeDidChange), name: .themeDidChange, object: nil)
        
    }
    
    
    deinit {
        // 移除监听
        NotificationCenter.default.removeObserver(self)
    }
    
    
    // 主题变化时调用
    @objc func themeDidChange() {
        applyTheme()
    }
    
    
    // 应用当前主题
    func applyTheme() {
        
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
